package cn.com.shaom.learning.sb.shiro.example.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.serializer.RedisSerializer;

/**
 * ClassName: SessionConfig
 * Description:
 * Date: 2018/2/23 10:08 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
@Configuration
public class SessionConfig {


    /*@Bean
    public RedisOperationsSessionRepository redisOperationsSessionRepository(RedisTemplate redisTemplate) {
        RedisOperationsSessionRepository repository = new RedisOperationsSessionRepository(redisTemplate);
        return repository;
    }*/

    @Bean
    public RedisSerializer<Object> springSessionDefaultRedisSerializer() {
        return new RedisConfig.RedisJsonSerializer();
    }
}
